<# # It is recommended to test the script on a local machine for its purpose and effects. # ManageEngine Endpoint Central will not be responsible for any # damage/loss to the data/setup based on the behavior of the script. # Description: Script is designed To fetch the Windows Activation Status # Configuration Type - COMPUTER # Refer - https://answers.microsoft.com/en-us/windows/forum/all/hi-is-my-windows-11-licensed-heres-the-slmgrvbs/ead215f4-0aa1-48cd-a0f1-d849c1b19195 #> $licenseInfo = cscript.exe C:\Windows\System32\slmgr.vbs /dlv | Out-String if ($licenseInfo -like "*License Status: Licensed*") { Write-Host "Licensed" } else { Write-Host "Not Licensed" }